@extends('layouts.homebase')
@section('tdk')
<title>{{$tdk['title']}}</title>
<meta name="keywords" content="{{$tdk['keywords']}}" />
<meta name="description" content="{{$tdk['description']}}" />
@endsection
@section('css')
@parent
<link rel="stylesheet" type="text/css" href="">
@endsection
@section('content')

<main>
  <div class="lbox">
    <div class="swiper-container banner">
      <div class="swiper-wrapper">
	  @foreach($latestarts as $art)
	  @if($loop->index < 2)
        <div class="swiper-slide">
           <a href="/detail/{{$art['art_id']}}.html" target="_blank"><img src="/home/img/0{{$loop->iteration}}.png" alt="aaa">
		   <section><h4>{{$art['title']}}</h4></section></a>
		</div>
	  @endif	
	  @endforeach	
      </div>
      <!-- Add Pagination -->
      <div class="swiper-pagination"></div>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
    </div>
    <div class="headline">
      <ul>        
	  	@foreach($latestarts as $art)
		<li style="height:40px;margin-bottom:0px;">
			<a href="/detail/{{$art['art_id']}}.html" title="{{$art['title']}}">
			<h3 style="text-shadow: 0 2px 4px rgb(0 0 0 / 50%);font-size: 14px;color: #333;">{{$art['title']}}</h3></a>
		</li>
		@endforeach			  
	  </ul>
    </div>
   <!-- headline end-->
   <div class="clear"></div>
   <div class="newsbox">
   <section>
        <div class="news">
          <a href="https://www.3dcax.com/duzhe/202301/"  target="_blank">
			  <h2 class="newstitle">广告位aa</h2>
		  </a>
          <ul>
			<li><a href="https://www.3dcax.com/duzhe/202301/22694.html" title="游戏人间" target="_blank">aaaaaaaaaa</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22693.html" title="窗台上的巨大身影" target="_blank">bbbbbbbbbbbbbbb</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22694.html" title="游戏人间" target="_blank">aaaaaaaaaa</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22693.html" title="窗台上的巨大身影" target="_blank">bbbbbbbbbbbbbbb</a></li>       
		  </ul>
        </div>
    </section>
    <section>
        <div class="news">
          <a href="https://www.3dcax.com/duzhe/202301/"  target="_blank">
			  <h2 class="newstitle">分类bb</h2>
		  </a>
          <ul>
			<li><a href="https://www.3dcax.com/duzhe/202301/22694.html" title="游戏人间" target="_blank">aaaaaaaaaa</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22693.html" title="窗台上的巨大身影" target="_blank">bbbbbbbbbbbbbbb</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22694.html" title="游戏人间" target="_blank">aaaaaaaaaa</a></li>
			<li><a href="https://www.3dcax.com/duzhe/202301/22693.html" title="窗台上的巨大身影" target="_blank">bbbbbbbbbbbbbbb</a></li>        
		  </ul>
        </div>
    </section>
    </div>
    <div class="clear"></div>
    <div class="article_box">
	@foreach($arts as $art)
      <section>
          <h2><span><a href="/{{$art->pinyin}}/"  target="_blank">更多</a></span>{{$art->catname}}</h2>
          <ul>
		  @foreach($art->arts as $a)
			<li><a href="/detail/{{$a['art_id']}}.html" target="_blank"><span>{{substr($a['created_at'],0,10)}}</span>{{$a['title']}}</a> </li>
		  @endforeach	
          </ul>
      </section>
	 @endforeach 
  </div>
  </div>
  <aside class="rbox">
    <div class="news_kx">
      <h2>最热</h2>
     <ul>         
	 	@foreach($hotarts as $art)
		<li><i></i><a href="/detail/{{$art['art_id']}}.html" title="{{$art['title']}}" target="_blank">{{$art['title']}}</a></li>
		@endforeach	
	 </ul>   
    </div>
    <!--<div class="lm_hot"><p class="h_title">文章分类</p><ul><li><a href="" target="_blank"></a></li></ul></div>-->
	<div class="userpl">
	<p class="h_title">文章评论</p>
	<ul>
	@foreach($comments as $com)
		<li>
			<i>{{$loop->iteration}}</i>
			<a href="/detail/{{$com['art_id']}}.html">{{$com['username']}}<span>{{$com['created_at']}}</span>评论文章：<h3>{{$com['art']['title']}}</h3>
			<p>{{ delcontent_html($com['comment'],80) }}</p>
			</a>
		</li>
	@endforeach	
	</ul> 
	</div>
   <div class="tj_writer">
    <p class="h_title"><a href="/tags/" target="_blank">标签</a></p>
      <ul>
	  @foreach($tags as $t)
		<li><a href="/tag/{{$t['tag_id']}}.html" target="_blank"><p>{{$t['tagname']}}</p></a></li>
	  @endforeach
      </ul>
   </div>
   <div class="tj_writer">
      <p class="h_title"><a href="/dates/" target="_blank">文章归档</a></p>
      <ul>
	  	@foreach($datearts as $date)
		<li>
			<a href="/date/{{$date['time']}}/" target="_blank">{{$date['time']}}</a>
		</li>
		@endforeach		
      </ul>
    </div>
  </aside>
 </main>
 <div class="links">
  <div class="box"><p>友情链接</p>
	 <ul>
	 @foreach($links as $k=>$v)
		 <li><a href="{{$v}}" target="_blank">{{$k}}</a></li>
	 @endforeach
	 </ul>
  </div>
 </div>

@endsection
@section('js')
@parent
<script>
//banner	
 var swiper = new Swiper('.swiper-container', {
		pagination: '.swiper-pagination',
		nextButton: '.swiper-button-next',
		prevButton: '.swiper-button-prev',
		paginationClickable: true,
		spaceBetween: 100,
		centeredSlides: true,
		autoplay: 8000,
		autoplayDisableOnInteraction: false,
	});
</script> 
<!-- banner end-->
@endsection







